'''
def func(a,*b,**c):
    s=0
    for i in b:
        s=s+a*i
    for j,k in c.items():
        s=s+a/k
    print(b)
    print(c)
    return s
p=func(3,2,5,6,d=8,e=10)
print(p)
'''

'''
def func(x,y,z=1,*arg,**kwarg):
    print(x,y,z)
    print(arg)
    print(kwarg)
func(1,2,3,4,5,m=6)
'''

'''
d1={"k1":'12345',"k2":[1,2,3,8,24,35],"k3":{"u1":12,"u2":34}}
def f6(arg):
    ret={}
    for key,value in arg.items():
      if len(value)>2:
         ret[key]=value[0:2]
      else:
         ret[key]=value
    return ret
print(f6(d1))
'''

'''
L = ['b','a','c']
def f(x, result=['a','b','c','d']):
    if x:
        result.remove(x[-1])
        f(x[:-1])
    return result
print(f(L))
'''

l = 'bac'
def f(x, result=['a','b','c','d']):
    if x:
        result.remove(x[-1])
        f(x[:-1])
    return result
print(f(l))